Offline index builds for database tables

ABSTRACT

Offline building of a projected data subset may be performed. A request to create a data set that is a projected subset of data from a source data set may be received. A data store separate from the data store storing the source data set may store a copy of the source data set that is used to replicate items to the projected subset of data according to a schema for the projected data subset. Updates made to the source data set may also be replicated to the projected data subset according to the schema. Conflicts between replicated items and replicated updates to the projected data set may be resolved by comparing a version identifier for the replicated update and replicated item to determine what to store in the projected data subset.

BACKGROUND

Data is often distributed to scale the storage capacity or processingcapacity of systems that provide access to the data. For example,database tables or other data objects can be divided into partitions inorder to leverage the capacity of different hosts, such as differentservers or other computing devices, to separately provide access toindividual partitions. Replicating different portions of the partitioneddata can further increase the complexity and costs of propagatingchanges to the data to other data replicas. For example, projections orviews of a partitioned database table may be separately maintained.Propagating changes to the projection or views may increase the costs ofprocessing updates at the original partitions of the database table asthe original partitions of the database table may need to ensure thatthe appropriate projections or views of the database table are updated.Techniques that can provide scalable mechanisms for replicating updatesto replicated data are thus highly desirable.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a logical block diagram illustrating offline index builds fordatabase tables, according to some embodiments.

FIG. 2 is a logical block diagram illustrating a provider networkoffering a database service that may implement offline index builds fordatabase tables, according to some embodiments.

FIG. 3 is a logical block diagram illustrating interactions to performoffline index builds for database tables in a database service,according to some embodiments.

FIG. 4 is a logical block diagram illustrating a timeline of timestampsfor performing offline index builds for database tables, according tosome embodiments.

FIG. 5 is a logical block diagram illustrating example interactions tocreate multiple secondary indexes offline and in parallel, according tosome embodiments.

FIG. 6 is a high-level flowchart illustrating various methods andtechniques to implement offline builds for projected data subsets,according to some embodiments.

FIG. 7 is a high-level flowchart illustrating various methods andtechniques to initialize propagation of updates at a new propagationnode, according to some embodiments.

FIG. 8 is a block diagram illustrating an example computing system,according to some embodiments.

While embodiments are described herein by way of example for severalembodiments and illustrative drawings, those skilled in the art willrecognize that the embodiments are not limited to the embodiments ordrawings described. It should be understood, that the drawings anddetailed description thereto are not intended to limit embodiments tothe particular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope as defined by the appended claims. The headings usedherein are for organizational purposes only and are not meant to be usedto limit the scope of the description or the claims. As used throughoutthis application, the word “may” is used in a permissive sense (i.e.,meaning having the potential to), rather than the mandatory sense (i.e.,meaning must). Similarly, the words “include”, “including”, and“includes” mean including, but not limited to.

DETAILED DESCRIPTION

The techniques described herein may implement offline index builds fordatabase tables. Data sets may be distributed across one or morelocations in a storage system, in some embodiments. In this way, clientscan access and independently update different portions of the data setat the one or more locations in the storage system, in some embodiments.The arrangement of the data set may be optimal for some access requests(e.g., queries based on indexed fields or values in a table). However,to optimally process other access requests (e.g., queries based onnon-indexed fields or values in a table), portions of the data set (orthe entire data set) may be replicated in one or more other locations(e.g., a different storage nodes, systems, or hosts) in a differentarrangement, subset, or format that is more performant for performingthe other type of access request, in some embodiments.

Instead of relying upon the resources of a source storage location for adata set to create new a new replica of a data set, such as a projecteddata subset like a secondary index as discussed below, offlinetechniques that index or otherwise determine which portions of a sourcedata set to replicate to the new replica using other resources, such asa separate system component or node, may be implemented. In this way, amajority of data that has to be replicated to the new replica canreplicated away from the source storage location, reducing the burden oftransferring data on source storage location resources (e.g., storagenodes as discussed below) to perform other operations, such as clientapplication requests to read or write to the data set. Additionally,offline techniques may reduce the state and/or other trackinginformation that is maintained by source storage location resources.Offline techniques may also reduce the complexity of failures at sourcestorage location resources and provide support for optimizations thatincrease the performance of creating the replica of the data by allowingfor parallel creation techniques, among others.

FIG. 1 is a logical block diagram illustrating offline index builds fordatabase tables, according to some embodiments. Source data set 112 maybe a database table (or tables), or other set, collection, or groupingof data item(s) 114 that may be also stored in a second location, suchas data store 130, as projected data subset 132. For example, asdiscussed in detail below with regard to FIGS. 2-5, source data set 112may be one or more database tables and projected data subset 152 may bea secondary index. Updates 102 may accepted and performed at data store110 that are directed to source data set 112, which may be various typesof actions, modifications, or changes to source data set 112 (e.g.,insert new item(s) (or attributes of items), modify item(s), deleteitems (or attributes of items)). These updates may be performed in someordering at data store 110. For example, updates 102 may be performed ina FIFO ordering where each update is performed as it is received.

To create a new replica of a source data set, an “offline” copy ofsource data set 112 may be used. For example, data store 120 may beanother data storage system (or set of resources) which may store sourcedata set copy 122, including item(s) 124. In at least some embodiments,source data set copy 122 may be a snapshot or other version of sourcedata set 112 associated with a particular point in time (e.g., the timeat which the copy 122 is created). Thus, item(s) 124 may or may not beconsistent with item(s) 114 (e.g., including additional or fewer items).Source data set copy 122 may be used to create projected data subset 132by evaluating item(s) 124 according to schema 150 to replicate thoseitems 106 that are specified by or otherwise satisfy the schema. Forexample, items with certain attribute values may be replicated (e.g., alocation attribute) that are specified by a schema (e.g., a secondaryindex that orders item(s) 114 by location instead of by customeridentifier) whereas other attribute values (or items) may not bereplicated (e.g., items with a particularly specified locationattribute, such as a postal code, may be replicated whereas items withdifferent postal codes may not be replicated). The replicated items 116may sent, written, or otherwise stored to data store 130 for inclusionin projected data subset 132. In this way, in scenarios where a largeprojected data subset 132 is created, a large majority of data can bereplicated from data store 120 (which may not be “online” andaccepting/performing access requests to source data set copy 122, unlikedata store 110 which may be accepting access requests to source data set112, such as updates 102).

In order to keep projected data subset 132 consistent with a source dataset 112, some of updates 102 may be replicated to data store 130 toupdate projected data subset 132 according to schema 150 for theprojected data subset 132. For example, as noted above items withcertain attribute values may be replicated (e.g., a location attribute)that are specified by a schema whereas other attribute values (or items)may not be replicated. Thus, only some updates 102 may be replicated insome scenarios (though all or none of received updates may be replicatedaccording to whether the schema 150 for the projected data subset 132includes the items affected by the updates).

Version comparison for projected item selection 140 may handle conflictsfrom replicated updates 104 and the replicated items 106 from “offline”copy of source data set 122 with items 124. For example, a timestamp,sequence number or other value may be assigned to replicated updates 104and replicated items 106 when received (e.g., at data store 110) andcreated (e.g., at data store 120, such as when source data set copy 122was created), when determined to be propagated or using some otherassignment technique. Such values may be a version for the update whichmay be used in a condition supplied by the conditional operation to datastore 130. If the condition is satisfied, then the operation may beperformed. For instance, a replicated item 106 could conflict with areplicated update 104 to that same item. If the replicated item 106 werereceived after the replicated update 104 for the item, the older versionof replicated item 106 could potentially overwrite a newer version ofthe item described in replicated update 104 if not for the versioncomparison 140 performed at data store 130.

Atomicity of conditional operations may, in some embodiments, prevent adifferent request or operation from modifying a condition evaluated tobe satisfied (or not) (e.g., by modifying an item version 156) betweenwhen the condition is evaluated and the update is applied as part of theconditional operation. Thus, if an update has a version condition thatto be satisfied must be a version later than a version associated withan item to which the update is applied, that condition check can preventout of order updates with respect to replicated items 106 (or otherupdates) from overwriting or otherwise becoming visible to clientapplications that access projected data subset 132. For example, itemversion(s) 136 may be stored as system attributes or values, in someembodiments, which are not visible to client applications of data store130. Instead, conditional operations received as part of propagation mayutilize the item version(s) 136 as the value to which update versionsare compared.

Please note that previous descriptions of a data store, data set, andconditional propagation are not intended to be limiting, but are merelyprovided as logical examples.

This specification begins with a general description of a providernetwork that may implement a database service that may implement offlineindex build. Then various examples of a database service are discussed,including different components/modules, or arrangements ofcomponents/module, that may be employed as part of implementing thedatabase service, in some embodiments. A number of different methods andtechniques to implement offline index build for databases are thendiscussed, some of which are illustrated in accompanying flowcharts.Finally, a description of an example computing system upon which thevarious components, modules, systems, devices, and/or nodes may beimplemented is provided. Various examples are provided throughout thespecification.

FIG. 2 is a logical block diagram illustrating a provider networkoffering a database service that may implement offline index builds fordatabase tables, according to some embodiments. Provider network 200 maybe a private or closed system, in some embodiments, or may be set up byan entity such as a company or a public sector organization to provideone or more services (such as various types of cloud-based storage)accessible via the Internet and/or other networks to clients 270, inanother embodiment. In some embodiments, provider network 200 may beimplemented in a single location or may include numerous data centershosting various resource pools, such as collections of physical and/orvirtualized computer servers, storage devices, networking equipment andthe like (e.g., computing system 1000 described below with regard toFIG. 8), needed to implement and distribute the infrastructure andstorage services offered by the provider network 200. In someembodiments, provider network 200 may implement various computingresources or services, such as database service 210 (e.g., anon-relational (NoSQL) database, relational database service or otherdatabase service that may utilize collections of items (e.g., tablesthat include items)), and other services (not illustrated), such as dataflow processing service, and/or other large scale data processingtechniques), data storage services (e.g., an object storage service,block-based storage service, or data storage service that may storedifferent types of data for centralized access), virtual computeservices, and/or any other type of network-based services (which mayinclude various other types of storage, processing, analysis,communication, event handling, visualization, and security services).

In various embodiments, the components illustrated in FIG. 2 may beimplemented directly within computer hardware, as instructions directlyor indirectly executable by computer hardware (e.g., a microprocessor orcomputer system), or using a combination of these techniques. Forexample, the components of FIG. 2 may be implemented by a system thatincludes a number of computing nodes (or simply, nodes), in someembodiments, each of which may be similar to the computer systemembodiment illustrated in FIG. 8 and described below. In someembodiments, the functionality of a given system or service component(e.g., a component of database service 210) may be implemented by aparticular node or may be distributed across several nodes. In someembodiments, a given node may implement the functionality of more thanone service system component (e.g., more than one data store component).

Database service 210 may implement various types of distributed databaseservices, in some embodiments, for storing, accessing, and updating datain tables hosted in key-value database. Such services may beenterprise-class database systems that are highly scalable andextensible. In some embodiments, access requests (e.g., requests toget/obtain items, put/insert items, delete items, update or modifyitems, scan multiple items) may be directed to a table in databaseservice 210 that is distributed across multiple physical resources, andthe database system may be scaled up or down on an as needed basis. Insome embodiments, clients/subscribers may submit requests in a number ofways, e.g., interactively via graphical user interface (e.g., a console)or a programmatic interface to the database system. In some embodiments,database service 210 may provide a RESTful programmatic interface inorder to submit access requests (e.g., to get, insert, delete, or scandata). In some embodiments, a query language (e.g., Structured QueryLanguage (SQL) may be used to specify access requests.

In some embodiments, clients 270 may encompass any type of clientconfigurable to submit network-based requests to provider network 200via network 260, including requests for database service 210 (e.g., toaccess item(s) in a table or secondary index in database service 210).For example, in some embodiments a given client 270 may include asuitable version of a web browser, or may include a plug-in module orother type of code module that executes as an extension to or within anexecution environment provided by a web browser. Alternatively in adifferent embodiment, a client 270 may encompass an application such asa database client/application (or user interface thereof), a mediaapplication, an office application or any other application that maymake use of a database in database service 210 to store and/or accessthe data to implement various applications. In some embodiments, such anapplication may include sufficient protocol support (e.g., for asuitable version of Hypertext Transfer Protocol (HTTP)) for generatingand processing network-based services requests without necessarilyimplementing full browser support for all types of network-based data.That is, client 270 may be an application that interacts directly withprovider network 200, in some embodiments. In some embodiments, client270 may generate network-based services requests according to aRepresentational State Transfer (REST)-style network-based servicesarchitecture, a document- or message-based network-based servicesarchitecture, or another suitable network-based services architecture.Note that in some embodiments, clients of database service 210 may beimplemented within provider network 200 (e.g., applications hosted on avirtual compute service).

In some embodiments, clients of database service 210 may be implementedon resources within provider network 200 (not illustrated). For example,a client application may be hosted on a virtual machine or othercomputing resources implemented as part of another provider networkservice that may send access requests to database service 210 via aninternal network (not illustrated).

In some embodiments, a client 270 may provide access to provider network200 to other applications in a manner that is transparent to thoseapplications. For example, client 270 may integrate with a database ondatabase service 210. In such an embodiment, applications may not needto be modified to make use of a service model that utilizes databaseservice 210. Instead, the details of interfacing to the database service210 may be coordinated by client 270.

Client(s) 270 may convey network-based services requests to and receiveresponses from provider network 200 via network 260, in someembodiments. In some embodiments, network 260 may encompass any suitablecombination of networking hardware and protocols necessary to establishnetwork-based-based communications between clients 270 and providernetwork 200. For example, network 260 may encompass the varioustelecommunications networks and service providers that collectivelyimplement the Internet. In some embodiments, network 260 may alsoinclude private networks such as local area networks (LANs) or wide areanetworks (WANs) as well as public or private wireless networks. Forexample, both a given client 270 and provider network 200 may berespectively provisioned within enterprises having their own internalnetworks. In such an embodiment, network 260 may include the hardware(e.g., modems, routers, switches, load balancers, proxy servers, etc.)and software (e.g., protocol stacks, accounting software,firewall/security software, etc.) necessary to establish a networkinglink between given client(s) 270 and the Internet as well as between theInternet and provider network 200. It is noted that in some embodiments,client(s) 270 may communicate with provider network 200 using a privatenetwork rather than the public Internet.

Database service 210 may implement request routing nodes 250, in someembodiments. Request routing nodes 250 may receive and parse clientaccess requests, in various embodiments in order to determine variousfeatures of the request, to parse, authenticate, throttle and/ordispatch access requests, among other things, in some embodiments.Database service 210 may implement propagation nodes 290, discussed indetail below with regard to FIGS. 3-5, which may handle propagationsessions with storage nodes, manage hot partitions, retry logic,checkpointing, and various other operations to implement propagation ofupdates to a secondary index.

In some embodiments, database service 210 may implement control plane220 to implement one or more administrative components, such asautomated admin instances or nodes (which may provide a variety ofvisibility and/or control functions). In various embodiments, controlplane 220 may direct the performance of different types of control planeoperations among the nodes, systems, or devices implementing databaseservice 210, in some embodiments. Control plane 220 may providevisibility and control to system administrators via administratorconsole 226, in some embodiment. Administrator console 226 may allowsystem administrators to interact directly with database service 210(and/or the underlying system). In some embodiments, the administratorconsole 226 may be the primary point of visibility and control fordatabase service 210 (e.g., for configuration or reconfiguration bysystem administrators). For example, the administrator console may beimplemented as a relatively thin client that provides display andcontrol functionally to system administrators and/or other privilegedusers, and through which system status indicators, metadata, and/oroperating parameters may be observed and/or updated. Control plane 220may provide an interface or access to information stored about one ormore detected control plane events, such as data backup or othermanagement operations for a table, at database service 210, in someembodiments.

Storage node management 224 may provide resource allocation, in someembodiments, for storing additional data in table submitted to databaseservice 210. For instance, control plane 220 may communicate withprocessing nodes to initiate the performance of various control planeoperations, such as moves of table partitions, splits of tablepartitions, update tables, delete tables, create secondary indexes, etc.. . . In some embodiments, control plane 220 may include a node recoveryfeature or component that handles failure events for storage nodes 230,propagation nodes 290 and request routing nodes 250 (e.g., adding newnodes, removing failing or underperforming nodes, deactivating ordecommissioning underutilized nodes, etc).

Various durability, resiliency, control, or other operations may bedirected by control plane 220. For example, storage node management 224may detect split, copy, or move events for partitions at storage nodesin order to ensure that the storage nodes maintain satisfy a minimumperformance level for performing access requests. For instance, invarious embodiments, there may be situations in which a partition (or areplica thereof) may need to be copied, e.g., from one storage node toanother. For example, if there are three replicas of a particularpartition, each hosted on a different physical or logical machine, andone of the machines fails, the replica hosted on that machine may needto be replaced by a new copy of the partition on another machine. Inanother example, if a particular machine that hosts multiple partitionsof one or more tables experiences heavy traffic, one of the heavilyaccessed partitions may be moved (using a copy operation) to a machinethat is experiencing less traffic in an attempt to more evenlydistribute the system workload and improve performance. In someembodiments, storage node management 224 may perform partition movesusing a physical copying mechanism (e.g., a physical file systemmechanism, such as a file copy mechanism) that copies an entirepartition from one machine to another, rather than copying a snapshot ofthe partition data row by. While the partition is being copied, writeoperations targeting the partition may be logged. During the copyoperation, any logged write operations may be applied to the partitionby a catch-up process at periodic intervals (e.g., at a series ofcheckpoints). Once the entire partition has been copied to thedestination machine, any remaining logged write operations (i.e. anywrite operations performed since the last checkpoint) may be performedon the destination partition by a final catch-up process. Therefore, thedata in the destination partition may be consistent following thecompletion of the partition move, in some embodiments. In this way,storage node management 224 can move partitions amongst storage nodes230 while the partitions being moved are still “live” and able to acceptaccess requests.

In some embodiments, the partition moving process described above may beemployed in partition splitting operations by storage node management224 in response to the detection of a partition split event. Forexample, a partition may be split because it is large, e.g., when itbecomes too big to fit on one machine or storage device and/or in orderto keep the partition size small enough to quickly rebuild thepartitions hosted on a single machine (using a large number of parallelprocesses) in the event of a machine failure. A partition may also besplit when it becomes too “hot” (i.e. when it experiences a much greaterthan average amount of traffic as compared to other partitions). Forexample, if the workload changes suddenly and/or dramatically for agiven partition, the system may be configured to react quickly to thechange. In some embodiments, the partition splitting process describedherein may be transparent to applications and clients/users, which mayallow the data storage service to be scaled automatically (i.e. withoutrequiring client/user intervention or initiation).

In some embodiments, each database partition 234 may be identified by apartition ID, which may be a unique number (e.g., a GUID) assigned atthe time the partition is created. A partition 234 may also have aversion number that is incremented each time the partition goes througha reconfiguration (e.g., in response to adding or removing replicas, butnot necessarily in response to a master failover). When a partition issplit, two new partitions may be created, each of which may have arespective new partition ID, and the original partition ID may no longerbe used, in some embodiments. In some embodiments, a partition may besplit by the system using a split tool or process in response tochanging conditions.

Split or move events may be detected by storage node management 224 invarious ways. For example, partition size and heat, where heat may betracked by internally measured metrics (such as IOPS), externallymeasured metrics (such as latency), and/or other factors may beevaluated with respect to various performance thresholds.

System anomalies may also trigger split or move events (e.g., networkpartitions that disrupt communications between replicas of a partitionin a replica group, in some embodiments. Storage node management 224 maydetect storage node failures, or provide other anomaly control, in someembodiments. If the partition replica hosted on the storage node onwhich a fault or failure was detected was the master for its replicagroup, a new master may be elected for the replica group (e.g., fromamongst remaining storage nodes in the replica group). Storage nodemanagement 224 may initiate creation of a replacement partition replicawhile the source partition replica is live (i.e. while one or more ofthe replicas of the partition continue to accept and service requestsdirected to the partition), in some embodiments. In various embodiments,the partition replica on the faulty storage node may be used as thesource partition replica, or another replica for same partition (on aworking machine) may be used as the source partition replica, e.g.,depending type and/or severity of the detected fault.

Control plane 220 may implement table/index creation and management 222to manage the creation (or deletion) of database tables and/or secondaryindexes hosed in database service 210, in some embodiments. For example,a request to create a secondary index may be submitted via administratorconsole 226 (or other database service 210 interface) which may initiateperformance of a workflow to generate appropriate system metadata (e.g.,a table identifier that is unique with respect to all other tables indatabase service 210, secondary index performance or configurationparameters, and/or various other operations for creating a secondaryindex as discussed below). Backup management 228 may handle or managethe creation of backup requests to make copies as of a version orpoint-in-time of a database, as backup partitions 242 in storage service240, which as discussed above with regard to FIG. 1 and below withregard to FIGS. 3-7 may be used to perform an offline build of areplicated data set like a secondary index.

In some embodiments, database service 210 may also implement a pluralityof storage nodes 230, each of which may manage one or more partitions ofa database table or secondary index on behalf of clients/users or onbehalf of database service 210 which may be stored in database storage234 (on storage devices attached to storage nodes 230 or in networkstorage accessible to storage nodes 230).

Storage nodes 230 may implement item request processing 232, in someembodiments. Item request processing 232 may perform various operations(e.g., read/get, write/update/modify/change, insert/add, ordelete/remove) to access individual items stored in tables in databaseservice 210, in some embodiments. In some embodiments, item requestprocessing 232 may support operations performed as part of atransaction, including techniques such as locking items in a transactionand/or ordering requests to operate on an item as part of transactionalong with other requests according to timestamps (e.g., timestampordering) so that storage nodes 230 can accept or reject thetransaction-related requests. In some embodiments, item requestprocessing 232 may maintain database partitions 234 according to adatabase model (e.g., a non-relational, NoSQL, or other key-valuedatabase model). In some embodiments, item request processing 232 mayperform operations to update, store, and/or send an update replicationlog to propagation node(s) 290, as discussed below with regard to FIG.3.

In some embodiments, database service 210 may provide functionality forcreating, accessing, and/or managing tables or secondary indexes atnodes within a multi-tenant environment. For example, databasepartitions 234 may store table item(s) from multiple tables, indexes, orother data stored on behalf of different clients, applications, users,accounts or non-related entities, in some embodiments.

In addition to dividing or otherwise distributing data (e.g., databasetables) across storage nodes 230 in separate partitions, storage nodes230 may also be used in multiple different arrangements for providingresiliency and/or durability of data as part of larger collections orgroups of resources. A replica group, for example, may be composed of anumber of storage nodes maintaining a replica of particular portion ofdata (e.g., a partition) for the database service 210, as discussedbelow with regard to FIG. 3. Moreover, different replica groups mayutilize overlapping nodes, where a storage node 230 may be a member ofmultiple replica groups, maintaining replicas for each of those groupswhose other storage node 230 members differ from the other replicagroups.

Different models, schemas or formats for storing data for databasetables in database service 210 may be implemented, in some embodiments.For example, in some embodiments, non-relational, NoSQL,semi-structured, or other key-value data formats may be implemented. Inat least some embodiments, the data model may include tables containingitems that have one or more attributes. In such embodiments, each tablemaintained on behalf of a client/user may include one or more items, andeach item may include a collection of one or more attributes. Theattributes of an item may be a collection of one or more name-valuepairs, in any order, in some embodiments. In some embodiments, eachattribute in an item may have a name, a type, and a value. In someembodiments, the items may be managed by assigning each item a primarykey value (which may include one or more attribute values), and thisprimary key value may also be used to uniquely identify the item. Insome embodiments, a large number of attributes may be defined across theitems in a table, but each item may contain a sparse set of theseattributes (with the particular attributes specified for one item beingunrelated to the attributes of another item in the same table), and allof the attributes may be optional except for the primary keyattribute(s) and version attributes, in some embodiments. In someembodiments, the tables maintained by the database service 210 (and theunderlying storage system) may have no pre-defined schema other thantheir reliance on the primary key.

Metadata or other system data for tables may also be stored as part ofdatabase partitions using similar partitioning schemes and using similarindexes, in some embodiments.

Database service 210 may provide an application programming interface(API) for requesting various operations targeting tables, indexes,items, and/or attributes maintained on behalf of storage serviceclients. In some embodiments, the service (and/or the underlying system)may provide both control plane APIs and data plane APIs. The controlplane APIs provided by database service 210 (and/or the underlyingsystem) may be used to manipulate table-level entities, such as tablesand indexes and/or to re-configure various tables These APIs may becalled relatively infrequently (when compared to data plane APIs). Insome embodiments, the control plane APIs provided by the service may beused to create tables or secondary indexes for tables at separatestorage nodes, import tables, export tables, delete tables or secondaryindexes, explore tables or secondary indexes (e.g., to generate variousperformance reports or skew reports), modify table configurations oroperating parameter for tables or secondary indexes, and/or describetables or secondary indexes, and create and/or associate functions withtables. In some embodiments, control plane APIs that perform updates totable-level entries may invoke asynchronous workflows to perform arequested operation. Methods that request “description” information(e.g., via a describeTables API) may simply return the current knownstate of the tables or secondary indexes maintained by the service onbehalf of a client/user. The data plane APIs provided by databaseservice 210 (and/or the underlying system) may be used to performitem-level operations, such as requests for individual items or formultiple items in one or more tables table, such as queries, batchoperations, and/or scans.

The APIs provided by the service described herein may support requestand response parameters encoded in one or more industry-standard orproprietary data exchange formats, in different embodiments. Forexample, in various embodiments, requests and responses may adhere to ahuman-readable (e.g., text-based) data interchange standard, (e.g.,JavaScript Object Notation, or JSON), or may be represented using abinary encoding (which, in some cases, may be more compact than atext-based representation). In various embodiments, the system maysupply default values (e.g., system-wide, user-specific, oraccount-specific default values) for one or more of the input parametersof the APIs described herein.

Database service 210 may include support for some or all of thefollowing operations on data maintained in a table (or index) by theservice on behalf of a storage service client: perform a transaction(inclusive of one or more operations on one or more items in one or moretables), put (or store) an item, get (or retrieve) one or more itemshaving a specified primary key, delete an item, update the attributes ina single item, query for items using an index, and scan (e.g., listitems) over the whole table, optionally filtering the items returned, orconditional variations on the operations described above that areatomically performed (e.g., conditional put, conditional get,conditional delete, conditional update, etc.). For example, the databaseservice 210 (and/or underlying system) described herein may providevarious data plane APIs for performing item-level operations, such as aTransactItems API, PutItem API, a GetItem (or GetItems) API, aDeleteItem API, and/or an UpdateItem API, as well as one or moreindex-based seek/traversal operations across multiple items in a table,such as a Query API and/or a Scan API.

Storage service 240 may be file, object-based, or other type of storageservice that may be used to store partition snapshots 242 as backups.Storage service 240 may implement striping, sharding, or other datadistribution techniques so that different portions of a partition backup242 are stored across multiple locations (e.g., at separate nodes). Invarious embodiments, storage nodes 230 may implement partition backupprocessing 233 to store partition snapshots 242 (e.g., by storing a copyof a partition 234 as of a point-in-time as a snapshot object 242 instorage service 240. In at least some embodiments, update logs 244(e.g., created by updates for database partitions 234 by item requestprocessing 232) may be stored as objects in storage service 240.

FIG. 3 is a logical block diagram illustrating interactions to performoffline index builds for database tables in a database service,according to some embodiments. Table index creation management 222 mayreceive are request to create a secondary index (or multiple ones) asindicated 341. Index management 222 may send a request to create anindex snapshot at secondary index storage nodes 343 to backup management228. Backup management 228 may perform an operation to create an indexsnapshot according to creation timestamp 345 to storage service 240. Forexample, a creation timestamp, as discussed below with regard to FIG. 4,may occur after timestamp ordering is enabled for a source databasetable. In some embodiments, creation of the snapshot may include takingan already created snapshot and applying a log of updates also stored instorage service 240 (as discussed above) to bring the snapshot up to astate consistent with creation timestamp. In some embodiments, backupmanagement 228 may create the index snapshot by applying the schema whencreating the snapshot (e.g., arranging, excluding, or other operationsas specified by the schema) so that the created index snapshot is aversion of the secondary index consistent with the creation timestamp.In other embodiments, as noted below, backup management 228 may evaluatea created index snapshot to then determine what items to replicate.

Backup management 228 may then replicate items obtained from thesnapshot using conditional operations 347 to storage nodes for secondaryindex 320 that satisfy a schema for the secondary index. For example,backup management 228 may scan the created snapshot and evaluate eachitem with respect to the schema by issuing reads, scans, queries, orother various other access requests with respect to the items of thesnapshot in storage service 240. Storage node(s) for secondary index 320may be assigned to the secondary index by table/indexcreation/management 222 (not illustrated), in some embodiments.

Index creation management may start replication from log replicationtimestamp 349 to propagators 310. As discussed below with regard to FIG.4, log replication timestamp may occur (in time) before the creationtimestamp to create an overlap for the updates replicated from theupdate log and the version of the source database table in the createdindex snapshot. Propagators 310 may initiate a log stream from the logreplication timestamp 351 from storage nodes 330 for the source table(which may send updates as a stream of log records). For example,storage nodes for source table 330 may determine what updates in anupdate log occur on or after the log replication timestamp and send themto propagation node(s) 310. Propagators 310 may replicate updates fromwith conditional operations 353 to storage nodes 320 that satisfy theschema for the secondary index. Some updates in the log stream, forinstance, may not be specified for inclusion in the secondary indexaccording to the schema and thus may be ignored or dropped.

Backup management 228 may provide an indication of completion from thesnapshot 355 to table/index creation/management 222, in variousembodiments. For example, backup management 228 may determine that nomore items are to be replicated from the snapshot and in response sendcompletion of the creation of the secondary index from snapshot.Table/index creation/management 222 may provide an indication that thesecondary index is created 357 to a client in response to the creationfrom snapshot 355, in some embodiments.

FIG. 4 is a logical block diagram illustrating a timeline of timestampsfor performing offline index builds for database tables, according tosome embodiments. A source database table may be updated over time, asindicated 410. In order to ensure that all updates are replicated to asecondary index using a snapshot, different timestamps may be used tocreate an overlap that may prevent an in-flight update from being leftout of a secondary index. For example, timestamp ordering may be enabledat time 412. This may occur when the source database table is created,when the secondary index is created, or in response to some otherrequest to enable timestamp ordering. Prior to timestamp orderingenabled 412, updates may be received without an assigned timestamp suchthat version comparisons could not be performed, in some embodiments.Snapshot creation timestamp may be at 416. Snapshot creation timestamp416 may be associated with a time that a secondary index creationrequest is received, in various embodiments. Log replication timestampmay be at 414. In various embodiments, log replication timestamp 414 maybe determined (e.g., by table/index creation/management 222) to providea minimum amount of overlap (e.g., 10 seconds, 1 hour, etc.) in time sothat replication of updates from the log stream may occur from 420onwards should also be included in the snapshot created according tosnapshot creation timestamp 416.

FIG. 5 is a logical block diagram illustrating example interactions tocreate multiple secondary indexes offline and in parallel, according tosome embodiments. Backup management 228 may create a snapshot atsnapshot creation timestamp 510 in storage service 240, as discussedabove. In some embodiments, this snapshot may not be specific to storingthe items of any one secondary index, but instead may be a snapshot ofan entire source database table (or partition of a database table).Backup management 228 may access the timestamp to replicate 540 items totheir different storage nodes to create different secondary indexes 522according to different schemas in parallel. For example, Backupmanagement 228 may replicate items 540 a (e.g., by location attribute)according to schema 530 a (e.g., which specifies the location attribute)to storage nodes 520 a to store as part of partition(s) 522 a for thesecondary index. Whereas backup management 228 may replicate items 540 b(e.g., by category attribute) according to schema 530 a (e.g., whichspecifies the category attribute) to storage nodes 520 b to store aspart of partition(s) 522 b for the secondary index and backup management228 may replicate items 540 c (e.g., ordered by date attribute insteadof user identifier) according to schema 530 c (e.g., which specifies theordering by date attribute) to storage nodes 520 c to store as part ofpartition(s) 522 c for the secondary index. In this way, a singlesnapshot 510 can be used to create multiple secondary indexes.

Propagation nodes, such as propagation nodes 550 a, 550 b, and 550 c,may respectively propagate log stream updates 560 a, 560 b, and 560 c toupdate (conditionally as described above with regard to FIG. 3)secondary index partition(s) 522 a, 522 b, and 522 c respectively. Insome embodiments, a single propagation node may be assigned to a sourcetable (or source partition of a table) and may perform the propagationof log stream updates 560 to each of the different secondary indexpartition(s) 522 a, 522 b, and 522 c (not illustrated). In at least someembodiments, a metric or other indicator of the progress of a secondaryindex offline build may be provided to a user via metricscollection/monitoring service of a provider network 200 or via aninterface for database service 210 (e.g., by table/indexcreation/management 222). For example, the number of partitions to fillin the secondary index, as represented by K, may be used to determinethis metric by calculating the amount of data, K*10 partition amount(e.g., 10 GB), the speed at which partitions can be filled, K*writebandwidth (e.g., 1,000 KB/s), to determine the total time, data dividedby speed. In some embodiments, the progress metric may be determinedfrom an amount of time elapsed relative to the estimated total time.

The examples of a database that implements offline index builds fordatabase tables as discussed in FIGS. 2-5 above have been given inregard to a database service (e.g., relational database, documentdatabase, non-relational database, etc.). However, various other typesof database systems or storage systems can advantageously implementoffline builds for projected data subsets, in other embodiments. FIG. 6is a high-level flowchart illustrating various methods and techniques toimplement offline builds for projected data subsets, according to someembodiments. These techniques, as well as the techniques discussed withregard to FIG. 7, may be implemented using components or systems asdescribed above with regard to FIGS. 2-5, as well as other types ofdatabases or storage systems, and thus the following discussion is notintended to be limiting as to the other types of systems that mayimplement the described techniques.

As indicated at 610, a request may be received to create a second dataset from a first data set stored in a first data store, the second dataset being created according to as schema that projects a subset of datafrom the first data set to the second data set, in some embodiments. Forexample, as discussed above with regard to FIG. 1, a schema for aprojected data subset may provide a different arrangement or otherordering of items stored in a source data set, such as a secondary indexdiscussed above. In some embodiments, the same number of items may bereplicated, but only a subset of attributes may be replicated accordingto the schema (e.g., a source table with 5 columns may be replicated toa projected data subset that only includes 2 columns). The request maybe formatted according to an interface for the first data store (e.g.,an API, command line interface, GUI, etc.) and may specify or identifythe schema as well as the source data set, the first data set. In someembodiments, the destination for the replicated data subset, the thirddata store may be specified as part of the request and/or the seconddata store (e.g., the data storage service or other data store separatefrom the first data store) that stores the copy of the first data set.

As indicated at 620, the second data set maybe created from a copy ofthe first data set stored in a third data store, in some embodiments.For example, the copy may be created (e.g., as a snapshot) in responseto the request to create the second data set, in some embodiments. Insome embodiments, the copy may exist before the request to create thesecond data set.

The first data set may be available for updates while the second dataset is being created, in various embodiments. Therefore, techniques forhandling conflicts between updates that may be applicable to the seconddata set that are received while the second data set is being createdfrom the copy and the copy of the first data set itself may be handled.For example, as indicated at 630, updates performed to the first dataset may be replicated to the second data set according to the schema, insome embodiments. As indicated at 640, items from the copy of the firstdata set in the third data store may be replicated to the second dataset according to the schema, as indicated at 640, in variousembodiments.

If no conflict between a replicated item and replicated updates isdetected, then replication may continue, as indicated at 650. Forexample, as discussed above, replication may involve performingconditional updates using version identifiers. If a version identifierin a conditional request does not satisfy the condition, then therequest may fail. For example, as indicated at 660, a version identifier(e.g., a timestamp or other indication of ordering that versions of theitem should be made visible at the second data set) for the replicatedupdate may be compared with a version identifier for the replicateditem. If the replicated update occurred after creation of the item, asindicated by the version identifier comparison, then the replicatedupdate may be selected to store in the second data set, as indicated at672 (e.g., as either the value to retain or to overwrite an existingvalue). Similarly, if the replicated update occurred before creation ofthe item, as indicated by the version identifier comparison, then thereplicated item may be selected to store in the second data set, asindicated at 674 (e.g., as either the value to retain or to overwrite anexisting value).

Replication may continue until replication of items form the copy iscomplete. Then, as indicated by the positive exit from 680, replicationof updates alone may continue, as indicated at 690. For example, theupdate log stream may still be replicated by a propagation node even ifno more items are replicated from a snapshot in a data storage service.

FIG. 7 is a high-level flowchart illustrating various methods andtechniques to initialize propagation of updates at a new propagationnode, according to some embodiments. As indicated at 710, a request tocreate a secondary index for a database table may be received, invarious embodiments. As indicated at 720, a determination may be made asto whether timestamp ordering is enabled. For example, system or tableconfiguration data may indicate whether or not timestamp ordering isenabled. If not, then timestamp ordering may be enabled for the databasetable, as indicated at 722, in various embodiments. For example,timestamps may begin to be assigned to updates that are received for thedatabase table, in some embodiments.

As indicated at 730, storage node(s) for the secondary index may beallocated, in some embodiments. For example, a control plane or othercomponent of a database system may identify storage nodes with capacityto store a partition of the secondary index to be created (e.g., eitherwith other partitions for other tables or secondary indexes inmulti-tenant fashion or as dedicated storage node for the secondaryindex that does not store other partitions). As indicated at 740, asnapshot creation timestamp and log replication timestamp may bedetermined for the secondary index, in various embodiments. For example,the creation timestamp may be a timestamp associated with the creationrequest of the secondary index and the replication timestamp may be atimestamp that occurs some amount of time prior to the creationtimestamp (e.g., according to a specified or fixed overlap period toensure that no inflight updates are not included in the secondaryindex).

As indicated at 750, a snapshot of the database table may be createdaccording to the snapshot creation timestamp, in some embodiments. Forexample, as discussed above a snapshot earlier than the snapshotcreation timestamp may be updated from log records of updates that occurup to the snapshot creation timestamp in order to create the snapshot.In some embodiments, the snapshot of the database table may be an entirecopy of the database table or a copy formatted according to a schema forthe secondary index.

As indicated at 760, item(s) from the snapshot may be replicatedaccording to a schema for the secondary index, in some embodiments. Forinstance, items may be evaluated with respect to the schema and/orformatted or ordered according to the schema when replicated (e.g., sentvia conditional operation requests) to the allocated storage nodes. Asindicated at 770, replication from the replication timestamp may bestarted in an update log for the database table, in some embodiments.For example, a propagation node may send a request to storage nodes thatstore the database table to begin replication of the update log instreaming fashion to the propagation node starting from the replicationtimestamp.

The methods described herein may in various embodiments be implementedby any combination of hardware and software. For example, in someembodiments, the methods may be implemented by a computer system (e.g.,a computer system as in FIG. 8) that includes one or more processorsexecuting program instructions stored on a computer-readable storagemedium coupled to the processors. The program instructions may implementthe functionality described herein (e.g., the functionality of variousservers and other components that implement the distributed systemsdescribed herein). The various methods as illustrated in the figures anddescribed herein represent example embodiments of methods. The order ofany method may be changed, and various elements may be added, reordered,combined, omitted, modified, etc.

Embodiments to implement offline builds for projected data subsets asdescribed herein may be executed on one or more computer systems, whichmay interact with various other devices. One such computer system isillustrated by FIG. 8. In different embodiments, computer system 1000may be any of various types of devices, including, but not limited to, apersonal computer system, desktop computer, laptop, notebook, or netbookcomputer, mainframe computer system, handheld computer, workstation,network computer, a camera, a set top box, a mobile device, a consumerdevice, video game console, handheld video game device, applicationserver, storage device, a peripheral device such as a switch, modem,router, or in general any type of computing or compute node, computingdevice or electronic device.

In the illustrated embodiment, computer system 1000 includes one or moreprocessors 1010 coupled to a system memory 1020 via an input/output(I/O) interface 1030. Computer system 1000 further includes a networkinterface 1040 coupled to I/O interface 1030, and one or moreinput/output devices 1050, such as cursor control device, keyboard, anddisplay(s). Display(s) may include standard computer monitor(s) and/orother display systems, technologies or devices, in some embodiments. Insome embodiments, it is contemplated that embodiments may be implementedusing a single instance of computer system 1000, while in otherembodiments multiple such systems, or multiple nodes making up computersystem 1000, may host different portions or instances of embodiments.For example, in some embodiments some elements may be implemented viaone or more nodes of computer system 1000 that are distinct from thosenodes implementing other elements.

In various embodiments, computer system 1000 may be a uniprocessorsystem including one processor 1010, or a multiprocessor systemincluding several processors 1010 (e.g., two, four, eight, or anothersuitable number). Processors 1010 may be any suitable processor capableof executing instructions, in some embodiments. For example, in variousembodiments, processors 1010 may be general-purpose or embeddedprocessors implementing any of a variety of instruction setarchitectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, orany other suitable ISA. In multiprocessor systems, each of processors1010 may commonly, but not necessarily, implement the same ISA.

In some embodiments, at least one processor 1010 may be a graphicsprocessing unit. A graphics processing unit or GPU may be considered adedicated graphics-rendering device for a personal computer,workstation, game console or other computing or electronic device, insome embodiments. Modern GPUs may be very efficient at manipulating anddisplaying computer graphics, and their highly parallel structure maymake them more effective than typical CPUs for a range of complexgraphical algorithms. For example, a graphics processor may implement anumber of graphics primitive operations in a way that makes executingthem much faster than drawing directly to the screen with a host centralprocessing unit (CPU). In various embodiments, graphics rendering may,at least in part, be implemented by program instructions for executionon one of, or parallel execution on two or more of, such GPUs. TheGPU(s) may implement one or more application programmer interfaces(APIs) that permit programmers to invoke the functionality of theGPU(s), in some embodiments.

System memory 1020 may store program instructions 1025 and/or dataaccessible by processor 1010 to implement associating a function with atable in a database system, in some embodiments. In various embodiments,system memory 1020 may be implemented using any suitable memorytechnology, such as static random access memory (SRAM), synchronousdynamic RAM (SDRAM), nonvolatile/Flash-type memory, or any other type ofmemory. In the illustrated embodiment, program instructions and dataimplementing desired functions, such as those described above to performoffline builds for projected data subsets are shown stored within systemmemory 1020 as program instructions 1025 and data storage 1035,respectively. In other embodiments, program instructions and/or data maybe received, sent or stored upon different types of computer-accessiblemedia or on similar media separate from system memory 1020 or computersystem 1000. A computer-accessible medium may include non-transitorystorage media or memory media such as magnetic or optical media, e.g.,disk or CD/DVD-ROM coupled to computer system 1000 via I/O interface1030. Program instructions and data stored via a computer-accessiblemedium may be transmitted by transmission media or signals such aselectrical, electromagnetic, or digital signals, which may be conveyedvia a communication medium such as a network and/or a wireless link,such as may be implemented via network interface 1040, in someembodiments.

In some embodiments, I/O interface 1030 may be coordinate I/O trafficbetween processor 1010, system memory 1020, and any peripheral devicesin the device, including network interface 1040 or other peripheralinterfaces, such as input/output devices 1050. In some embodiments, I/Ointerface 1030 may perform any necessary protocol, timing or other datatransformations to convert data signals from one component (e.g., systemmemory 1020) into a format suitable for use by another component (e.g.,processor 1010). In some embodiments, I/O interface 1030 may includesupport for devices attached through various types of peripheral buses,such as a variant of the Peripheral Component Interconnect (PCI) busstandard or the Universal Serial Bus (USB) standard, for example. Insome embodiments, the function of I/O interface 1030 may be split intotwo or more separate components, such as a north bridge and a southbridge, for example. In addition, in some embodiments some or all of thefunctionality of I/O interface 1030, such as an interface to systemmemory 1020, may be incorporated directly into processor 1010.

Network interface 1040 may allow data to be exchanged between computersystem 1000 and other devices attached to a network, such as othercomputer systems, or between nodes of computer system 1000, in someembodiments. In various embodiments, network interface 1040 may supportcommunication via wired or wireless general data networks, such as anysuitable type of Ethernet network, for example; viatelecommunications/telephony networks such as analog voice networks ordigital fiber communications networks; via storage area networks such asFibre Channel SANs, or via any other suitable type of network and/orprotocol.

Input/output devices 1050 may, in some embodiments, include one or moredisplay terminals, keyboards, keypads, touchpads, scanning devices,voice or optical recognition devices, or any other devices suitable forentering or retrieving data by one or more computer system 1000, in someembodiments. Multiple input/output devices 1050 may be present incomputer system 1000 or may be distributed on various nodes of computersystem 1000, in some embodiments. In some embodiments, similarinput/output devices may be separate from computer system 1000 and mayinteract with one or more nodes of computer system 1000 through a wiredor wireless connection, such as over network interface 1040.

As shown in FIG. 8, memory 1020 may include program instructions 1025,that implement the various embodiments of the systems as describedherein, and data store 1035, comprising various data accessible byprogram instructions 1025, in some embodiments. In some embodiments,program instructions 1025 may include software elements of embodimentsas described herein and as illustrated in the Figures. Data storage 1035may include data that may be used in embodiments. In other embodiments,other or different software elements and data may be included.

Those skilled in the art will appreciate that computer system 1000 ismerely illustrative and is not intended to limit the scope of theembodiments as described herein. In particular, the computer system anddevices may include any combination of hardware or software that canperform the indicated functions, including a computer, personal computersystem, desktop computer, laptop, notebook, or netbook computer,mainframe computer system, handheld computer, workstation, networkcomputer, a camera, a set top box, a mobile device, network device,internet appliance, PDA, wireless phones, pagers, a consumer device,video game console, handheld video game device, application server,storage device, a peripheral device such as a switch, modem, router, orin general any type of computing or electronic device. Computer system1000 may also be connected to other devices that are not illustrated, orinstead may operate as a stand-alone system. In addition, thefunctionality provided by the illustrated components may in someembodiments be combined in fewer components or distributed in additionalcomponents. Similarly, in some embodiments, the functionality of some ofthe illustrated components may not be provided and/or other additionalfunctionality may be available.

Those skilled in the art will also appreciate that, while various itemsare illustrated as being stored in memory or on storage while beingused, these items or portions of them may be transferred between memoryand other storage devices for purposes of memory management and dataintegrity. Alternatively, in other embodiments some or all of thesoftware components may execute in memory on another device andcommunicate with the illustrated computer system via inter-computercommunication. Some or all of the system components or data structuresmay also be stored (e.g., as instructions or structured data) on acomputer-accessible medium or a portable article to be read by anappropriate drive, various examples of which are described above. Insome embodiments, instructions stored on a computer-readable mediumseparate from computer system 1000 may be transmitted to computer system1000 via transmission media or signals such as electrical,electromagnetic, or digital signals, conveyed via a communication mediumsuch as a network and/or a wireless link. This computer readable storagemedium may be non-transitory. Various embodiments may further includereceiving, sending or storing instructions and/or data implemented inaccordance with the foregoing description upon a computer-accessiblemedium. Accordingly, the present invention may be practiced with othercomputer system configurations.

Various embodiments may further include receiving, sending or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a computer-accessible medium. Generally speaking, acomputer-accessible medium may include storage media or memory mediasuch as magnetic or optical media, e.g., disk or DVD/CD-ROM,non-volatile media such as RAM (e.g. SDRAM, DDR, RDRAM, SRAM, etc.),ROM, etc., as well as transmission media or signals such as electrical,electromagnetic, or digital signals, conveyed via a communication mediumsuch as network and/or a wireless link.

The various methods as illustrated in the Figures and described hereinrepresent example embodiments of methods. The methods may be implementedin software, hardware, or a combination thereof. The order of method maybe changed, and various elements may be added, reordered, combined,omitted, modified, etc.

Various modifications and changes may be made as would be obvious to aperson skilled in the art having the benefit of this disclosure. It isintended that the invention embrace all such modifications and changesand, accordingly, the above description to be regarded in anillustrative rather than a restrictive sense.

What is claimed is:
 1. A system, comprising: a plurality of computingdevices, respectively comprising a processor and a memory, thatimplement a database system, wherein the database system comprises acontrol plane, a first one or more storage nodes that store a databasetable, and a second one or more storage nodes; wherein the control planeis configured to: receive a request to create a secondary index from thedatabase table according to a schema that projects a subset of data fromthe database table to the secondary index, wherein the database table isable to be updated during creation of the secondary index; responsive tothe request: allocate the second one or more storage nodes to store thesecondary index; initiate replication of updates performed to thedatabase table in the first one or more storage nodes to the secondaryindex in the second one or more storage nodes according to the schema;initiate replication of items from a snapshot created for the databasetable stored separate from the first one or more storage nodes to thesecondary index in the second one or more storage nodes according theschema; and wherein the second one or more storage nodes are configuredto select between one of the replicated updates and one of thereplicated items to store in the secondary index by comparing a firstversion identifier for the one replicated item with a second versionidentifier for the one replicated update, wherein the one replicatedupdate is selected when the first version identifier indicates that theone replicated update occurred after a creation of the snapshot of thedatabase table.
 2. The system of claim 1, wherein replication of updatesperformed to the database table is begun according to a timestamp thatoccurs before the creation of the snapshot of the database table.
 3. Thesystem of claim 1, wherein replication of updates performed to thedatabase table to the secondary index are performed as conditionaloperation requests; wherein replication of items from the snapshot tothe secondary index are performed as conditional operation requests. 4.The system of claim 1, wherein the database system is further configuredto create the snapshot for the database table according to a determinedsnapshot creation timestamp in response to the request to create thesecondary index.
 5. A method, comprising: receiving a request to createa second data set from a first data set stored in a first data store,wherein the second data set is created according to a schema specifiedin the request that projects a subset of data from the first data set tothe second data set, wherein the first data set is able to be updatedduring creation of the second data set; responsive to the request,creating the second data set in a second data store from a copy of thefirst data set stored in a third data store, wherein the creatingcomprises: replicating updates performed to the first data set in thefirst data store to the second data set in the second data storeaccording to the schema; replicating items from the copy of the firstdata set in the third data store to the second data set in the seconddata store according the schema; and selecting between one of thereplicated updates and one of the replicated items to store in thesecond data set by comparing a first version identifier for the onereplicated item with a second version identifier for the one replicatedupdate, wherein the one replicated update is selected when the firstversion identifier indicates that the one replicated update occurredafter a creation of the copy of the first data set.
 6. The method ofclaim 5, wherein the replication of updates performed to the second dataset is begun according to a timestamp that occurs before the creation ofthe copy of the first data set.
 7. The method of claim 5, whereinreplicating items from the copy of the first data set in the third datastore to the second data set in the second data store comprises sendingrespective conditional operation requests to the second data store theitems.
 8. The method of claim 5, updates performed to the first data setin the first data store to the second data set in the second data storecomprises sending respective conditional operation requests to thesecond data to perform the updates.
 9. The method of claim 5, furthercomprising: creating the copy of the first data set according to adetermined creation timestamp in response to the request to create thesecond data set.
 10. The method of claim 5, further comprising sendingan indication that the second data is available for access whenreplication of the items from the copy is complete.
 11. The method ofclaim 10, further comprising continuing replicating the updatesperformed to the first data set in the first data store to the seconddata set in the second data store according to the schema whenreplication of the items from the copy is complete.
 12. The method ofclaim 5, wherein the method further comprises creating one or more otherdata sets according to a different respective schema from the copy ofthe first data set in parallel with the creating of the secondary dataset.
 13. The method of claim 5, wherein the first version identifier isa first timestamp and wherein the second version identifier is a secondtimestamp, and wherein the method further comprises enabling timestampordering for the first data set in response to the request to create thesecond data set.
 14. One or more non-transitory, computer-readablestorage media, storing program instructions that when executed on oracross one or more computing devices cause the one or more computingdevices to implement: receiving a request to create a second data setfrom a first data set stored in a first data store, wherein the seconddata set is created according to a schema specified in the request thatprojects a subset of data from the first data set to the second dataset, wherein the first data set is able to be updated during creation ofthe second data set; responsive to the request: allocating a second datastore to store the second data set; causing replication of updatesperformed to the first data set in the first data store to the seconddata set in the second data store according to the schema; causingreplication of items from a copy of the first data set stored in a thirddata store to the second data set in the second data store according theschema; and wherein the second data store selects between one of thereplicated updates and one of the replicated items to store in thesecond data set by comparing a first version identifier for the onereplicated item with a second version identifier for the one replicatedupdate, wherein the one replicated update is selected when the firstversion identifier indicates that the one replicated update occurredafter a creation of the copy of the first data set.
 15. The one or morenon-transitory, computer-readable storage media of claim 14, wherein thereplication items from the copy of the first data set in the third datastore to the second data set in the second data store is performed usingrespective conditional operation requests to the second data store theitems.
 16. The one or more non-transitory, computer-readable storagemedia of claim 14, storing further instructions that when executed bythe one or more computing devices cause the one or more computingdevices to implement sending an indication that the second data isavailable for access when replication of the items from the copy iscomplete.
 17. The one or more non-transitory, computer-readable storagemedia of claim 14, storing further instructions that when executed bythe one or more computing devices cause the one or more computingdevices to implement generating and providing one or more progressmetrics for creating the second data set in response to a request. 18.The one or more non-transitory, computer-readable storage media of claim14, storing further instructions that when executed by the one or morecomputing devices cause the one or more computing devices to implement:creating the copy of the first data set according to a determinedcreation timestamp in response to the request to create the second dataset.
 19. The one or more non-transitory, computer-readable storage mediaof claim 14, wherein the replication of updates performed to the seconddata set is begun according to a timestamp that occurs before thecreation of the copy of the first data set.
 20. The one or morenon-transitory, computer-readable storage media of claim 14, wherein theone or more computing devices are implemented as part of a control planefor a database service hosted by a provider network.